const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
	entry: {
		app: './src/index.js',
		print: './src/print.js'
	},
	// 启动 sorurece-map
	devtool: 'inline-source-map',
	plugins: [
		new HtmlWebpackPlugin({
			title: 'Output Management'
		})
	],
	// 构建输出目录
  output: {
    filename: '[name].bundle.js',
    path: path.resolve(__dirname, 'dist')
  },
	module: {
			rules: [
				{
					test: /\.css$/,
					use: [
						'style-loader',
						'css-loader'
					]
				}
			]
		}
};